const formidable = require("formidable");
const form = new formidable.IncomingForm();
module.exports = function (req) {
  new Promise((resolve, reject) => {
    form.parse(req, (err, fields, fiels) => {
      if (err) reject(err);
      else resolve({ fields, fiels });
    });
  });
};
